//
//  FTBLFreshHeaderView.m
//  FaceTo
//
//  Created by 姚冬元 on 2017/7/30.
//  Copyright © 2017年 chengbangming. All rights reserved.
//

#import "FTBLFreshHeaderView.h"

@implementation FTBLFreshHeaderView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self initUI];
    }
    return self;
}

- (void)initUI
{
    self.contentView.backgroundColor = Color(237, 237, 237);

    UILabel *titlelbl = [[UILabel alloc] init];
    titlelbl.text = @"附近的设备";
    titlelbl.textColor = FontColor;
    titlelbl.font = LPFont(11);
    [self addSubview:titlelbl];
    
    
    [titlelbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(20);
        make.centerY.equalTo(self.mas_centerY);
    }];
    
    
    UIButton *refreshBtn = [[UIButton alloc] init];
    [refreshBtn setTitle:@"刷新" forState:UIControlStateNormal];
    [refreshBtn setTitleColor:FontColor forState:UIControlStateNormal];
    [refreshBtn setImage:[UIImage imageNamed:@"refresh"] forState:UIControlStateNormal];
    refreshBtn.titleLabel.font = LPFont(11);
    refreshBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -5, 0, 5);
    [self addSubview:refreshBtn];
    
    [refreshBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.offset(-20);
        make.centerY.equalTo(self.mas_centerY);
    }];
}

@end
